Telegram Group & Telegram Channel
Даны следующие таблицы:

Customers

| CustomerID |   Name   |     City      |
|------------|----------|---------------|
| 1 | John | New York |
| 2 | Jane | Chicago |
| 3 | Mark | Los Angeles |
| 4 | Sarah | San Francisco |
| 5 | Michael | Houston |

Orders

| OrderID | CustomerID | OrderDate | TotalAmount |
|---------|------------|------------|-------------|
| 1 | 1 | 2022-05-15 | 500 |
| 2 | 2 | 2022-06-20 | 750 |
| 3 | 3 | 2022-06-25 | 1000 |
| 4 | 1 | 2022-07-10 | 300 |
| 5 | 4 | 2022-08-05 | 900 |

Какой из следующих SQL запросов вернет имена покупателей, разместивших как минимум 2 заказа?

A) SELECT Name FROM Customers WHERE CustomerID IN (SELECT CustomerID FROM Orders GROUP BY CustomerID HAVING COUNT(*) >= 2)

B) SELECT Name FROM Customers JOIN Orders ON Customers.CustomerID = Orders.CustomerID GROUP BY Customers.CustomerID HAVING COUNT(*) >= 2

C) SELECT Name FROM Customers JOIN Orders ON Customers.CustomerID = Orders.CustomerID WHERE COUNT(*) >= 2

D) SELECT Name FROM Customers WHERE CustomerID IN (SELECT CustomerID FROM Orders WHERE COUNT(*) >= 2)



tg-me.com/sql_for_qa/113
Create:
Last Update:

Даны следующие таблицы:

Customers

| CustomerID |   Name   |     City      |
|------------|----------|---------------|
| 1 | John | New York |
| 2 | Jane | Chicago |
| 3 | Mark | Los Angeles |
| 4 | Sarah | San Francisco |
| 5 | Michael | Houston |

Orders

| OrderID | CustomerID | OrderDate | TotalAmount |
|---------|------------|------------|-------------|
| 1 | 1 | 2022-05-15 | 500 |
| 2 | 2 | 2022-06-20 | 750 |
| 3 | 3 | 2022-06-25 | 1000 |
| 4 | 1 | 2022-07-10 | 300 |
| 5 | 4 | 2022-08-05 | 900 |

Какой из следующих SQL запросов вернет имена покупателей, разместивших как минимум 2 заказа?

A) SELECT Name FROM Customers WHERE CustomerID IN (SELECT CustomerID FROM Orders GROUP BY CustomerID HAVING COUNT(*) >= 2)

B) SELECT Name FROM Customers JOIN Orders ON Customers.CustomerID = Orders.CustomerID GROUP BY Customers.CustomerID HAVING COUNT(*) >= 2

C) SELECT Name FROM Customers JOIN Orders ON Customers.CustomerID = Orders.CustomerID WHERE COUNT(*) >= 2

D) SELECT Name FROM Customers WHERE CustomerID IN (SELECT CustomerID FROM Orders WHERE COUNT(*) >= 2)

BY SQL для тестировщика


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/sql_for_qa/113

View MORE
Open in Telegram


SQL для тестировщика Telegram | DID YOU KNOW?

Date: |

Telegram today rolling out an update which brings with it several new features.The update also adds interactive emoji. When you send one of the select animated emoji in chat, you can now tap on it to initiate a full screen animation. The update also adds interactive emoji. When you send one of the select animated emoji in chat, you can now tap on it to initiate a full screen animation. This is then visible to you or anyone else who's also present in chat at the moment. The animations are also accompanied by vibrations. This is then visible to you or anyone else who's also present in chat at the moment. The animations are also accompanied by vibrations.

Telegram Be The Next Best SPAC

I have no inside knowledge of a potential stock listing of the popular anti-Whatsapp messaging app, Telegram. But I know this much, judging by most people I talk to, especially crypto investors, if Telegram ever went public, people would gobble it up. I know I would. I’m waiting for it. So is Sergei Sergienko, who claims he owns $800,000 of Telegram’s pre-initial coin offering (ICO) tokens. “If Telegram does a SPAC IPO, there would be demand for this issue. It would probably outstrip the interest we saw during the ICO. Why? Because as of right now Telegram looks like a liberal application that can accept anyone - right after WhatsApp and others have turn on the censorship,” he says.

SQL для тестировщика from ar


Telegram SQL для тестировщика
FROM USA